/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow strict-local
 */
import React from 'react';
import {useState} from 'react';
import {
  SafeAreaView,
  StatusBar,
  Text,
  Button,
  DeviceEventEmitter,
} from 'react-native';
import MarqueeView from './MarqueeViewNativeComponent';

const App = () => {
  const [result, setResult] = useState<number | null>(null);
  const [result2, setResult2] = useState<number | null>(null);

  DeviceEventEmitter.addListener('clickMarqueeEvent', e => {
    console.log('e: ', e);
  });

  return (
    <SafeAreaView>
      <StatusBar barStyle={'dark-content'} />

      <MarqueeView
        src="Lorem ipsum dolor sit"
        style={{
          height: 180,
          width: '100%',
          backgroundColor: 'hsl(210, 80%, 50%)',
        }}
        onStop={e => {
          console.log('e: ', e);
        }}
      />

      {/* <Text style={{marginLeft: 20, marginTop: 20}}>3+7={result ?? '??'}</Text>
      <Button title="Compute" onPress={async () => {}} /> */}
    </SafeAreaView>
  );
};
export default App;
